package dangnhap;

import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.EventQueue;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeListener;
import java.util.Random;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingWorker;
import javax.swing.Timer;
import javax.swing.border.EmptyBorder;
import javax.swing.JProgressBar;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.Color;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.Image;


public class Pro extends JDialog {

	private JPanel contentPane;
	private JProgressBar progressBar1;
	
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Pro frame = new Pro();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}


	public Pro() {
		setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
		this.setTitle("Phần mềm quản lý bán hàng.");
		Image icon = Toolkit.getDefaultToolkit().getImage("images/TrangChu.gif");
        this.setIconImage(icon); 
		java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
	    setBounds((screenSize.width-502)/2, (screenSize.height-100)/2, 502, 100);
		this.setModal(true);
		
		
		//setBounds(100, 100, 502, 100);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(5, 5));
		setContentPane(contentPane);
		
		progressBar1 = new JProgressBar(0,100);
		contentPane.add(progressBar1, BorderLayout.CENTER);
		
		JLabel lblXinChao = new JLabel("Chào mừng bạn đến với phần mềm quản lý bán hàng.");
		lblXinChao.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblXinChao.setForeground(Color.BLUE);
		lblXinChao.setHorizontalAlignment(SwingConstants.CENTER);
		contentPane.add(lblXinChao, BorderLayout.NORTH);
		
		JButton btnNewButton = new JButton("Start");
		contentPane.add(btnNewButton, BorderLayout.WEST);
//		progressBar.setValue(50);
//		progressBar.setStringPainted(true);
		
		
	}

}
